package com.swak.monitor.job.web;

import java.util.Set;

import org.springframework.beans.factory.annotation.Autowired;

import com.swak.annotation.Post;
import com.swak.annotation.RestService;
import com.swak.entity.Result;
import com.swak.monitor.job.service.JobMonitorService;

@RestService(value = "JobApi", path = "/api/monitor/job")
public class JobApi {

	@Autowired
	private JobMonitorService fluxService;

	/**
	 * 提供的服务： 后期提供分页
	 * 
	 * @return
	 */
	@Post(value = "/services")
	public Result<Set<String>> jobs() {
		return Result.success(fluxService.jobs());
	}

	/**
	 * 指定 - 提供的服务
	 * 
	 * @param monitors
	 * @param synchronizers
	 * @return
	 */
	@Post(value = "/service")
	public Result<Set<String>> job(String job) {
		return Result.success(fluxService.jobs(job));
	}
}